package com.sms.shared;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name="equipmentreading")
public class EquipmentReading implements Serializable{
	public EquipmentReading(){
		
	}
	@Id
	@GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
	@Column(name = "Id")
	private Long id;
	@Column
	private java.util.Date readingDate;
	@Column
	private java.util.Date createdDate;
	@Column
	private java.lang.Double voltage;
	@Column
	private java.lang.Double current;
	@Column
	private java.lang.Double power;
	@Column
	private java.lang.Double energy;
	@Column
	private java.lang.Double instantPowerFactor;
	@Column
	private java.lang.Double apparentPower;
	@Column
	private java.lang.Double apparentEnergy;
	@Column
	private java.lang.Double frequency;
	@Column
	private java.lang.Double runningMins;
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "equipmentId", insertable = true, updatable = true)
	private Equipment equipment;
	
	@Column(name = "phase", nullable = true, length = 10)
	private String phase;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public java.util.Date getReadingDate() {
		return readingDate;
	}
	public void setReadingDate(java.util.Date readingDate) {
		this.readingDate = readingDate;
	}
	public java.util.Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(java.util.Date createdDate) {
		this.createdDate = createdDate;
	}
	public java.lang.Double getVoltage() {
		return voltage;
	}
	public void setVoltage(java.lang.Double voltage) {
		this.voltage = voltage;
	}
	public java.lang.Double getCurrent() {
		return current;
	}
	public void setCurrent(java.lang.Double current) {
		this.current = current;
	}
	public java.lang.Double getPower() {
		return power;
	}
	public void setPower(java.lang.Double power) {
		this.power = power;
	}
	public java.lang.Double getEnergy() {
		return energy;
	}
	public void setEnergy(java.lang.Double energy) {
		this.energy = energy;
	}
	public Equipment getEquipment() {
		return equipment;
	}
	public void setEquipment(Equipment equipment) {
		this.equipment = equipment;
	}
	public String getPhase() {
		return phase;
	}
	public void setPhase(String phase) {
		this.phase = phase;
	}
	public java.lang.Double getInstantPowerFactor() {
		return instantPowerFactor;
	}
	public void setInstantPowerFactor(java.lang.Double instantPowerFactor) {
		this.instantPowerFactor = instantPowerFactor;
	}
	public java.lang.Double getApparentPower() {
		return apparentPower;
	}
	public void setApparentPower(java.lang.Double apparentPower) {
		this.apparentPower = apparentPower;
	}
	public java.lang.Double getApparentEnergy() {
		return apparentEnergy;
	}
	public void setApparentEnergy(java.lang.Double apparentEnergy) {
		this.apparentEnergy = apparentEnergy;
	}
	public java.lang.Double getFrequency() {
		return frequency;
	}
	public void setFrequency(java.lang.Double frequency) {
		this.frequency = frequency;
	}
	public java.lang.Double getRunningMins() {
		return runningMins;
	}
	public void setRunningMins(java.lang.Double runningMins) {
		this.runningMins = runningMins;
	}
	
}
